package org.hy.persistence.mypage;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.hy.domain.mypage.MyCareerShow;
import org.hy.domain.mypage.MyCareerShowComment;
import org.hy.domain.mypage.MyCareerShowContent;
import org.hy.domain.ug.PostCommonComment;

public interface MyCareerShowMapper {
	MyCareerShow findMyCareerShowById(Integer id);
	
	MyCareerShow findMyCareerShowWithCommentsById(@Param("id") int id,@Param("offset")int offset,@Param("size")int size);
	
	List<MyCareerShow> findMyCareerShowsWithCommentsByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("limit")int limit);
	
	MyCareerShow findMyCareerShowWithDefaultCommentsById(@Param("id") int id,@Param("offset")int offset,@Param("size")int size);
	
	List<MyCareerShow> findMyCareerShowsWithDefaultCommentsByUid(@Param("uid") int uid,@Param("offset")int offset,@Param("limit")int limit);
	
	int insertMyCareerShow(MyCareerShow myCareerShow);
	
	int insertMyCareerShowContent(MyCareerShowContent myCareerShowContent);
	
	int insertMyCareerShowComment(MyCareerShowComment myCareerShowComment);
	
	int updateMyCareerShow(MyCareerShow myCareerShow);
	
	int updateMyCareerShowContent(MyCareerShowContent myCareerShowContent);
	
	int updateMyCareerShowComment(PostCommonComment myCareerShowComment);
	
	int deleteMyCareerShow(Integer id);
	
	int deleteMyCareerShowComment(Integer id);
	
	int countMyCareerShow(Integer uid);
	
	int countMyCareerShowComment(int refFeedId);
	
	/**
	 * 通过评论找到评论的内容，类似“我参与的”
	 * @param id
	 * @return
	 */
	MyCareerShow findMyCareerShowByMyComment(int id);
	
	/**
	 * "我参与的"列表形式
	 * @param uid
	 * @return
	 */
	List<MyCareerShow> findMyCareerShowsByMyComments(@Param("uid") int uid,@Param("offset")int offset,@Param("size")int size);
}
